f=open('xc7vx485tffg1761.txt')
lines=f.readlines()
f.close()
for i in range(len(lines)):
	bankname_0='0'
	if lines[i].split()[3]==bankname_0:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_0+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_13='13'
	if lines[i].split()[3]==bankname_13:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_13+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_14='14'
	if lines[i].split()[3]==bankname_14:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_14+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_15='15'
	if lines[i].split()[3]==bankname_15:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_15+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_16='16'
	if lines[i].split()[3]==bankname_16:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_16+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_17='17'
	if lines[i].split()[3]==bankname_17:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_17+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_18='18'
	if lines[i].split()[3]==bankname_18:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_18+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_19='19'
	if lines[i].split()[3]==bankname_19:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_19+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_33='33'
	if lines[i].split()[3]==bankname_33:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_33+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_34='34'
	if lines[i].split()[3]==bankname_34:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_34+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_35='35'
	if lines[i].split()[3]==bankname_35:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_35+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_36='36'
	if lines[i].split()[3]==bankname_36:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_36+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_37='37'
	if lines[i].split()[3]==bankname_37:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_37+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_38='38'
	if lines[i].split()[3]==bankname_38:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_38+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_39='39'
	if lines[i].split()[3]==bankname_39:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_39+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_12='12'
	if lines[i].split()[3]==bankname_12:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_12+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_32='32'
	if lines[i].split()[3]==bankname_32:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_32+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_31='31'
	if lines[i].split()[3]==bankname_31:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_31+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_113='113'
	if lines[i].split()[3]==bankname_113:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_113+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_114='114'
	if lines[i].split()[3]==bankname_114:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_114+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_115='115'
	if lines[i].split()[3]==bankname_115:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_115+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_116='116'
	if lines[i].split()[3]==bankname_116:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_116+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_118='118'
	if lines[i].split()[3]==bankname_118:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_118+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_119='119'
	if lines[i].split()[3]==bankname_119:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_119+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_117='117'
	if lines[i].split()[3]==bankname_117:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_117+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCINT='VCCINT'
	if lines[i].split()[1]==bankname_VCCINT:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCINT+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCAUX='VCCAUX'
	if lines[i].split()[1]==bankname_VCCAUX:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCAUX+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCAUX_IO_G0='VCCAUX_IO_G0'
	if lines[i].split()[1]==bankname_VCCAUX_IO_G0:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCAUX_IO_G0+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCAUX_IO_G1='VCCAUX_IO_G1'
	if lines[i].split()[1]==bankname_VCCAUX_IO_G1:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCAUX_IO_G1+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCAUX_IO_G2='VCCAUX_IO_G2'
	if lines[i].split()[1]==bankname_VCCAUX_IO_G2:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCAUX_IO_G2+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCAUX_IO_G3='VCCAUX_IO_G3'
	if lines[i].split()[1]==bankname_VCCAUX_IO_G3:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCAUX_IO_G3+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCAUX_IO_G4='VCCAUX_IO_G4'
	if lines[i].split()[1]==bankname_VCCAUX_IO_G4:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCAUX_IO_G4+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCAUX_IO_G5='VCCAUX_IO_G5'
	if lines[i].split()[1]==bankname_VCCAUX_IO_G5:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCAUX_IO_G5+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_VCCBRAM='VCCBRAM'
	if lines[i].split()[1]==bankname_VCCBRAM:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_VCCBRAM+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_MGTAVCC_G10='MGTAVCC_G10'
	if lines[i].split()[1]==bankname_MGTAVCC_G10:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_MGTAVCC_G10+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_MGTAVCC_G11='MGTAVCC_G11'
	if lines[i].split()[1]==bankname_MGTAVCC_G11:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_MGTAVCC_G11+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_MGTAVTT_G10='MGTAVTT_G10'
	if lines[i].split()[1]==bankname_MGTAVTT_G10:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_MGTAVTT_G10+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_MGTAVTT_G11='MGTAVTT_G11'
	if lines[i].split()[1]==bankname_MGTAVTT_G11:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_MGTAVTT_G11+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_MGTVCCAUX_G10='MGTVCCAUX_G10'
	if lines[i].split()[1]==bankname_MGTVCCAUX_G10:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_MGTVCCAUX_G10+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_MGTVCCAUX_G11='MGTVCCAUX_G11'
	if lines[i].split()[1]==bankname_MGTVCCAUX_G11:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_MGTVCCAUX_G11+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_NC='NC'
	if lines[i].split()[1]==bankname_NC and lines[i].split()[3]=='NA':
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+bankname_NC+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	if lines[i].split()[0]=='A2':
		index1=i
	if lines[i].split()[0]=='AY5':
		index2=i
	if lines[i].split()[0]=='AY9':
		index3=i
	if lines[i].split()[0]=='Y41':
		index4=i

for i in range(len(lines)):
	bankname_GND='GND'
	if lines[i].split()[1]==bankname_GND and index1<=i<=index2:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+'GND1'+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')

for i in range(len(lines)):
	bankname_GND='GND'
	if lines[i].split()[1]==bankname_GND and index3<=i<=index4:
		line=[lines[i].split()[0],lines[i].split()[1]+'_'+lines[i].split()[0]]
		with open('bank'+'GND2'+'.txt','aw') as ff:
			ff.write(' '.join(line)+'\n')
